from django.contrib import admin
from .models import Permission





# 定义一个模型类的管理器
class PermissionManager(admin.ModelAdmin):
    # 显示的类型
    list_display = ['id','title','code_name','type_name']
    # 点击可以实现跳转
    list_display_links = ['id']
    # 点击可以编辑
    list_editable = ['title','code_name']
    # 点击实现过滤
    list_filter = ['type_name']
    # 点击实现搜索
    search_fields = ['code_name']
# 注册权限模型类
admin.site.register(Permission,PermissionManager)



